package com.ruoyi.domain;

import com.ruoyi.common.core.domain.BaseEntity;

import java.io.Serializable;

/**
 * 公司#ttz_company
 * @TableName ttz_company
 */
public class Company extends BaseEntity implements Serializable {
    /**
     * 公司主键#primary
     */
    private Integer coId;

    /**
     * 公司名称
     */
    private String coName;

    /**
     * 公司代码
     */
    private String coCode;

    private static final long serialVersionUID = 1L;

    /**
     * 公司主键#primary
     */
    public Integer getCoId() {
        return coId;
    }

    /**
     * 公司主键#primary
     */
    public void setCoId(Integer coId) {
        this.coId = coId;
    }

    /**
     * 公司名称
     */
    public String getCoName() {
        return coName;
    }

    /**
     * 公司名称
     */
    public void setCoName(String coName) {
        this.coName = coName;
    }

    /**
     * 公司代码
     */
    public String getCoCode() {
        return coCode;
    }

    /**
     * 公司代码
     */
    public void setCoCode(String coCode) {
        this.coCode = coCode;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Company other = (Company) that;
        return (this.getCoId() == null ? other.getCoId() == null : this.getCoId().equals(other.getCoId()))
            && (this.getCoName() == null ? other.getCoName() == null : this.getCoName().equals(other.getCoName()))
            && (this.getCoCode() == null ? other.getCoCode() == null : this.getCoCode().equals(other.getCoCode()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getCoId() == null) ? 0 : getCoId().hashCode());
        result = prime * result + ((getCoName() == null) ? 0 : getCoName().hashCode());
        result = prime * result + ((getCoCode() == null) ? 0 : getCoCode().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", coId=").append(coId);
        sb.append(", coName=").append(coName);
        sb.append(", coCode=").append(coCode);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}